import java.util.TreeMap;
import java.util.TreeSet;

public class Test {
    public static void main3(String[] args) {
        ///创建一个映像
        TreeSet<String> set = new TreeSet<>();
        set.add("abc");
        set.add("def");
        set.add("hello");
        System.out.println(set);
    }
    public static void main2(String[] args) {
        //TreeMap<Key,Value>
        TreeMap<String,String> treeMap = new TreeMap();
        treeMap.put("齐天大圣","孙悟空");
        treeMap.put("天蓬元帅","猪八戒");
        treeMap.put("旃檀功德佛","唐三藏");
        treeMap.put("卷帘大将","沙悟净");
        System.out.println(treeMap);
    }
    public static void main(String[] args) {
        int[] array = {10,5,12,13,6};
        SearchBinaryTree tree = new SearchBinaryTree();
        for(int x : array){
            tree.insertTreeNode(x);
        }
//        tree.insertTreeNode(12);
        System.out.println(tree.searchTree(12));
        System.out.println(tree.searchTree(15));
        tree.removeTreeNode(15);
    }
}
